
<?php

$btn_select = array(
    'type' => 'submit',
    'class' => 'btn btn-sm btn-primary btn-block',
    'value' => 'Seleccionar'
);
$btn_cronograma = array(
    'type' => 'submit',
    'class' => 'btn btn-sm btn-primary btn-block',
    'value' => 'Agenda'
);
echo '</br><div class="panel panel-default">	';
echo ' <div class="panel-heading">
    <h3 class="panel-title">Buscar</h3>
  </div>';
echo ' <div class="panel-body">';
$source = array();
$source[''] = 'seleccionar[]';
foreach ($especialidades as $fila) {
    $source[$fila['id']] = $fila['nombre'];
}
$arrayMedicos = array();
foreach ($medicos as $fila) {
    $arrayMedicos[$fila['id']] = $fila['nombres'] . ' ' . $fila['apellidos'];
}
echo '<div class="row-fluid">';
echo '<div class="col-sm-6">';
echo '</br><div class="panel panel-default">	';
echo ' <div class="panel-heading">Especialidades';
echo'</div>';
echo ' <div class="panel-body">';
//echo form_open('cita_medica_controller/buscarMedicosByEspecialidad');
echo form_dropdown('especialidades[]', $source, null, 'class="form-control selectpicker"');
echo '</br>';
echo '</br>';
//echo form_submit($btn_select);
echo "</div>";
echo "</div>";
echo "</div>";
echo '<div class="col-sm-6">';
echo '</br><div class="panel panel-default">';
echo ' <div class="panel-heading">
    <h3 class="panel-title">' . $especialidad_select['nombre'] . '</h3>
  </div>';
echo form_close();
echo ' <div  class="panel-body">';
echo form_open('cita_medica_controller/agenda/');
echo form_dropdown('medicos[]', $arrayMedicos, null, 'class="form-control selectpicker" id="medico"');
echo '</br>';
echo '</br>';
echo form_submit($btn_cronograma);
echo "</div>";
echo "</div>";
echo "</div>";
echo "</div>";
echo form_close();

